<!--
 * @Author: your name
 * @Date: 2021-08-11 10:49:56
 * @LastEditTime: 2021-08-11 13:43:24
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\3-html&css\day08\04-clear.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .imgleft{
          
            width:200px;
            height:200px;
            background-color: chocolate;
            float:left;
            margin-left:50px;
        }
        #detail{
            width:800px;
            height:200px;
            background-color: darksalmon;
            /* 对之前的元素进行冻结 */
            
        }
        .clearboth{
            clear:both;
        }
        
    </style>
</head>
<body>
    失去对父元素的支撑：
    1.clear:both
    2.父元素：设置高度
    3.父元素：overflow:hidden
    clear:both;
    1.书写位置：可以是下一个非浮动的兄弟节点
    2.在下一个位置新增一个兄弟 <div class="clearboth"></div>
    在style里面写.clearboth{clear:both;}
    3.在最后一个位置新增一个兄弟元素 伪元素
          父元素::after{
              content:'';
              display:block;
              clear:both;
          }
        <div>
    <div class="imgleft"></div>
    <div  class="imgleft"></div>
    <div  class="imgleft"></div>
    <div id="detail"></div>
</div>
    <div>
        <div class="imgleft"></div>
        <div  class="imgleft"></div>
        <div  class="imgleft"></div>
        <div class="clearboth"></div>
        <div class="article">文字</div>
    </div>
</body>
</html>